package com.phevos.knowledge.model;

import java.io.Serializable;
import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class FilesId extends BaseObject implements Serializable {
    /**
     * 
     */
    private static final long serialVersionUID = -3722745992741021028L;
    private BigDecimal artId;
    private Long acceId;
    private String artFile;
    private String artFileComments;


    @Column(name="art_id", nullable=false, precision=38, scale=0)
    public BigDecimal getArtId() {
        return this.artId;
    }
    
    public void setArtId(BigDecimal artId) {
        this.artId = artId;
    }

    @Column(name="acce_id", nullable=false)
    public Long getAcceId() {
        return this.acceId;
    }
    
    public void setAcceId(Long acceId) {
        this.acceId = acceId;
    }

    @Column(name="art_file", nullable=false, length=765)
    public String getArtFile() {
        return this.artFile;
    }
    
    public void setArtFile(String artFile) {
        this.artFile = artFile;
    }

    @Column(name="art_file_comments", length=765)
    public String getArtFileComments() {
        return this.artFileComments;
    }
    
    public void setArtFileComments(String artFileComments) {
        this.artFileComments = artFileComments;
    }

    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        FilesId pojo = (FilesId) o;

        if (artId != null ? !artId.equals(pojo.artId) : pojo.artId != null) return false;
        if (acceId != null ? !acceId.equals(pojo.acceId) : pojo.acceId != null) return false;
        if (artFile != null ? !artFile.equals(pojo.artFile) : pojo.artFile != null) return false;
        if (artFileComments != null ? !artFileComments.equals(pojo.artFileComments) : pojo.artFileComments != null) return false;

        return true;
    }

    public int hashCode() {
        int result = 0;
        result = 31 * result + (artId != null ? artId.hashCode() : 0);
        result = (acceId != null ? acceId.hashCode() : 0);
        result = 31 * result + (artFile != null ? artFile.hashCode() : 0);
        result = 31 * result + (artFileComments != null ? artFileComments.hashCode() : 0);

        return result;
    }

    public String toString() {
        StringBuffer sb = new StringBuffer(getClass().getSimpleName());

        sb.append(" [");
        sb.append("artId").append("='").append(getArtId()).append("', ");
        sb.append("acceId").append("='").append(getAcceId()).append("', ");
        sb.append("artFile").append("='").append(getArtFile()).append("', ");
        sb.append("artFileComments").append("='").append(getArtFileComments()).append("'");
        sb.append("]");
      
        return sb.toString();
    }

}
